# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /cvs/zport/dev-ml/ocamlp3l/ocamlp3l-2.03.ebuild,v 1.1 2007/03/06 13:13:02 zechs Exp $

inherit eutils autotools

DESCRIPTION="OCaml Curses is a project to provide curses / ncurses  bindings for the Objective Caml  language."
HOMEPAGE="http://www.nongnu.org/ocaml-tmk/"
SRC_URI="http://download.savannah.nongnu.org/releases/ocaml-tmk/${P}.tar.gz"

LICENSE="LGPL"
SLOT="0"
KEYWORDS="x86 sparc"

IUSE=""
DEPEND="
  dev-lang/ocaml
  dev-ml/findlib"

src_unpack() {
	unpack ${A}
	cd ${S}
	eautoheader || die
	eautoconf || die
}

src_compile() {
	econf || die
	emake || die
	emake opt || die
}

src_install() {
	local destdir=`/usr/bin/ocamlc -where`
	dodir ${destdir}

	local myconf="OCAMLFIND_INSTFLAGS=-destdir ${D}${destdir} -ldconf ${D}usr/lib/ocaml/ld.conf"
	emake "${myconf}" install || die
}
